package com.huluobo.a2201mvvm_imdemo.register;

import androidx.lifecycle.MutableLiveData;

import com.huluobo.a2201mvvm_imdemo.bean.UserBean;
import com.huluobo.a2201mvvm_imdemo.mvvm.BaseViewModel;

/**
 * Created by LC on 2024/3/22.
 */
public class RegisterViewModel extends BaseViewModel<RegisterRepo> {
    MutableLiveData<UserBean> success = new MutableLiveData<>();
    MutableLiveData<String> failed = new MutableLiveData<>();

    public void register(String username, String password) {
        repo.register(username, password, success, failed);
    }

    @Override
    protected RegisterRepo createRepo() {
        return new RegisterRepo();
    }
}
